package com.atde._03_creational_design_patterns.builder.improve;


/**
 * @BelongsProject: hsp_java_design_mode
 * @BelongsPackage: com.atde._03_creational_design_patterns.builder.improve
 * @Author: Del
 * @CreateTime: 2025-06-18  18:44
 * @Description: 建造者模式 测试类
 * @Version: 1.0
 */
public class Client {
    public static void main(String[] args) {
        // 创建指挥者 将具体的产品传入进行创建
        HouseDirector houseDirector = new HouseDirector(new CommonHouse());
        // 创建产品
        House house = houseDirector.constructHouse();
        System.out.println(house);

        // 重置建造者
        houseDirector.setBuildHouse(new HighBuilding());
        house = houseDirector.constructHouse();
        System.out.println(house);


    }
}
